//
//  SMRTAgencyViewController.h
//  SMRTv1
//
//  Created by Ding on 8/12/13.
//  Copyright (c) 2013 Trans-Intelligence. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TableSection.h"
#import "Agency.h"
#import "SubSystem.h"
#import "XMLParser.h"
#import "CustomizedBarButtonItem.h"
#import "SMRTSyncTimePickerViewController.h"
#import "SMRTSubSystemViewController.h"

@interface SMRTAgencyViewController : UITableViewController <UIAlertViewDelegate, UITextViewDelegate>

@property (nonatomic,retain) NSMutableArray * sections;
@property (nonatomic,retain) TableSection * agencyNameSection;
@property (nonatomic,retain) TableSection * syncTimeSection;
@property (nonatomic,retain) TableSection * subSystemListSection;
@property (nonatomic,retain) NSArray *subSystemList;
@property (nonatomic,retain) UIButton *addSubSystemButton;
@property (nonatomic,retain) Agency *agency;
@property (assign) int publicSender;
@property (nonatomic,retain) UITextView * agencyNameTextView;
@property (nonatomic,retain) UITapGestureRecognizer *gestureRecognizer;
//@property (nonatomic,retain) UIDatePicker *timePicker;
- (void) clickAddSubSystemButton:(id)sender;
- (id) initWithNibNameAndAgency:(NSString *)nibName agency:(Agency *)agency bundle:(NSBundle *)nibBundle;
- (IBAction)textViewReturn:(id)sender;
- (void) updateViewController;
- (void) removeSubSystem: (int)row;
- (void) goToHome:(id)sender;

@end
